package com.wss.day06.bz;

import java.util.Scanner;

/**
 * @author wangshaoshuai
 * @desc TODO
 * @date 2025/4/26
 */
public class Test02 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个字符串:");
        String input = scanner.nextLine();
        scanner.close();

        int lowerCaseCount = 0;
        int upperCaseCount = 0;
        int digitCount = 0;

        for (int i = 0; i < input.length(); i++) {
            char c = input.charAt(i);
            if (Character.isLowerCase(c)) {
                lowerCaseCount++;
            } else if (Character.isUpperCase(c)) {
                upperCaseCount++;
            } else if (Character.isDigit(c)) {
                digitCount++;
            }
        }

        System.out.println("小写字母的个数: " + lowerCaseCount);
        System.out.println("大写字母的个数: " + upperCaseCount);
        System.out.println("数字的个数: " + digitCount);
    }
}
